package com.splant.android.smart.UILevel.Community;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
import com.splant.android.R;
import com.splant.android.smart.ModelLevel.ErrorMessageListBean;

public class Garden_Message_Activity extends Activity implements View.OnClickListener {

    private Button btn_goBack;
    private TextView tv_msgTitle;
    private TextView tv_msgDate;
    private TextView tv_msgContent;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.garden_message_activity);
        btn_goBack = (Button) findViewById(R.id.btn_goBack);
        tv_msgTitle= (TextView) findViewById(R.id.tv_msgTitle);
        tv_msgDate= (TextView) findViewById(R.id.tv_msgDate);
        tv_msgContent= (TextView) findViewById(R.id.tv_msgContent);

        init();

        btn_goBack.setOnClickListener(this);
    }

    private ErrorMessageListBean.ErrorMessage  msg;
    private void init()
    {
          msg= (ErrorMessageListBean.ErrorMessage) getIntent().getSerializableExtra("msg");

         if (msg!=null)
         {
             tv_msgTitle.setText(msg.getTitle());
             tv_msgDate.setText(msg.getDate());
             tv_msgContent.setText(msg.getContent());
         }

    }
    @Override
    public void onClick(View v) {

        switch (v.getId()) {
            case R.id.btn_goBack:
                finish();
                break;

        }
    }
}
